package com.design.movieticket.common.util;

import lombok.Data;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.stereotype.Component;

@Data
@Component
public class PasswordUtils {
    public boolean matchesPassword(String realPassword, String encodedPassword) {
        BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
        return passwordEncoder.matches(realPassword, encodedPassword);
    }
}
